home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
smaltalk
/
manchest.lha
/
MANCHESTER
/
manchester
/
2.2
/
NewPrimitives.st
< prev
next >
Wrap
Text File
|
1993-07-24
|
1KB
|
51 lines
" NAME NewPrimitives
AUTHOR tph@cs.man.ac.uk
FUNCTION access primitives allReferences, refct, etc
ST-VERSIONS 2.2
PREREQUISITES
CONFLICTS
DISTRIBUTION world
VERSION 1.1
DATE 22 Jan 1989
SUMMARY NewPrimitives
contains methods which access a number of useful
primitives hitherto inaccessible.(2.2). TPH
"!
'From Smalltalk-80, version 2, of April 1, 1983 on 14 July 1987 at 10:53:48 am'!
!Object methodsFor: 'system primitives'!
allReferences
"Answer a collection of all objects that refer to me."
| aCollection owner |
owner _ self firstOwner.
aCollection _ OrderedCollection new.
[owner _ self nextOwnerAfter: owner.
owner notNil] whileTrue: [aCollection add: owner].
^aCollection! !
'From Smalltalk-80, version 2, of April 1, 1983 on 14 July 1987 at 10:47:46 am'!
!Object methodsFor: 'system primitives'!
firstOwner
"Return the object with the lowest oop that refers to me"
<primitive: 197>
self primitiveFailed! !
'From Smalltalk-80, version 2, of April 1, 1983 on 14 July 1987 at 10:46:26 am'!
!Object methodsFor: 'system primitives'!
refct
"Return my reference count; doesn't seem to be correct in all cases"
<primitive: 134>
self primitiveFailed! !